﻿#coding: utf-8

require 'dm-validations'
require 'json'

class Template
	include DataMapper::Resource

	property :id_template, Serial
	property :name, String
	property :url, FilePath, :required => true
	

	def to_json(*a)
		{
			'name' => name.to_s,
			'url' => url.to_s,
		}.to_json(*a)
	end
end
